package com.hshh.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.hshh.common.Constant;
import com.hshh.service.LoginService;
import com.hshh.service.TestService;

@Controller
public class JsonController {
	@Autowired
	TestService testService;

	@RequestMapping(value={"/test/json"})
	public ModelAndView json(HttpServletRequest request,HttpServletResponse reponse) {
		Map<String, Object> param = new HashMap<String, Object>();
		List<Map<String, Object>> result = testService.getTestService(param);
		ModelAndView mav = new ModelAndView();
		mav.setViewName("jsonView");
		mav.addObject("result", result);
		return mav;
	}

}
